import http from '@/utils/http';
import {postAjax} from '@/utils/axios';



/**
 * 
 * @param params
 * @returns {*|Promise<any>}
 */
export const getAreaLevel = (params?: any) => {
  return http.get('bus/area/getAreaLevel', {params});
}


/**
 * 
 * @param params
 * @returns {*|Promise<any>}
 */
export const userAreaLevelTreeSelectData = (params?: any) => {
  return http.get('bus/area/userAreaLevelTreeSelectData', {params});
}

export const userWorkAreaTree = (params?: any) => {
  return postAjax('bus/area/userWorkAreaTree', params);
}

export const userTreeSelectDataHasCode = (params?: any) => {
  return http.get('bus/area/userTreeSelectDataHasCode', {params});
}

export const userTreeSelectData = (params?: any) => {
  return http.get('bus/area/userTreeSelectData', {params});
}

/**
 * 通过id获取区域信息
 * @param params
 * @returns {*|Promise<any>}
 */
export const userWorkAreaTreeSelectData = (params: any) => {
  return http.get('bus/area/userWorkAreaTreeSelectData/' + params.workId);
}


/**
 * 通过id获取区域信息
 * @param params
 * @returns {*|Promise<any>}
 */
export const userWorkAreaTreeSelectDataHasCode = (params: any) => {
  return http.get('bus/area/userWorkAreaTreeSelectDataHasCode/' + params.workId);
}


export const updateVector = (params?: any) => {
  return postAjax('bus/area/updateVector', params);
}

export const backVector = (params?: any) => {
  return postAjax('bus/area/backVector', params);
}




